<html>
<head><meta charset="utf-8"><title>breaking changes · t-compiler/wg-rfc-2229 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/index.html">t-compiler/wg-rfc-2229</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html">breaking changes</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="209370402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209370402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209370402">(Sep 08 2020 at 10:49)</a>:</h4>
<p>I realized <span class="user-mention" data-user-id="281950">@Aman Arora</span> that changing the capture behavior of <code>let _ = a</code> could be a breaking change in a <code>move</code> closure, as it could alter when the destructor of <code>a</code> runs -- i.e., it would run when the closure is dropped today, but if we change <code>let _ = a</code> to not capture, then it would run when <code>a</code> is dropped.</p>



<a name="209376707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209376707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209376707">(Sep 08 2020 at 12:06)</a>:</h4>
<p>right, I should've thought of that. I could be completely wrong here but I feel like <code>let _ = p</code>  might be used more than <code>let y = p.y</code> within a closure for code relying on p  being dropped once the closure is dropped. Though I guess adding <code>drop(p)</code> at the end of the closure body will be more explicit way of denoting what's going on.</p>



<a name="209393889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209393889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209393889">(Sep 08 2020 at 14:29)</a>:</h4>
<p>So I'm thinking about how we get around it once 2229 is implemented, because it kind of conflicts with how we are doing capture analysis - based on use instead of variables appearing within the closure. Here is kind of my thought process:</p>
<ul>
<li>We see what we missing from <code>upvars_mentioned</code> and make up for it. But that will means post-2229 following won't still be accepted (since we won't have information on fields).</li>
</ul>
<div class="codehilite"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Point</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">x</span>: <span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="n">y</span>: <span class="mi">20</span><span class="w"> </span><span class="p">};</span><span class="w"></span>

<span class="kd">let</span><span class="w"> </span><span class="n">c1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">move</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">       </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">x</span><span class="p">;</span><span class="w"></span>
<span class="p">};</span><span class="w"></span>

<span class="kd">let</span><span class="w"> </span><span class="n">c2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">move</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">       </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">.</span><span class="n">y</span><span class="p">;</span><span class="w"></span>
<span class="p">};</span><span class="w"></span>
</code></pre></div>


<p>(It doesn't work today either, so we won't be necessarily breaking things, but yet 2229 will be incomplete).</p>
<ul>
<li>I looked up logs for mem_cat and expr_use_visitor, is it me or does <a href="http://csclub.uwaterloo.ca/~a52arora/playground/let_pattern/mem_cat3">this</a> seems excessive for </li>
</ul>
<div class="codehilite"><pre><span></span><code><span class="k">struct</span> <span class="nc">Point</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">x</span>: <span class="kt">i32</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">y</span>: <span class="kt">i32</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Point</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">x</span>: <span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="n">y</span>: <span class="mi">5</span><span class="w"> </span><span class="p">};</span><span class="w"></span>

<span class="w">    </span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">p</span><span class="p">;</span><span class="w"> </span><span class="p">};</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>


<p>We do see the expression being processed, we just ignore it because the <code>pat</code> in <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/struct.Local.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/struct.Local.html</a> is <code>Wild</code>.</p>
<p>Even if we do start processing pat Wild in ExprUseVisitor, I'm not sure how we modify the delegate without typing it to Closures.  (Clippy uses expr use visitor).  </p>
<p>I was thinking along the lines of adding <code>consume_if_move_closure()</code> or something around the lines of passing some closure into euv that allows for conditional consumes. Second approach might be better, for the first one we can put <code>assert!(false)</code> in non closures -- but I don't necessarily like that approach.</p>



<a name="209418189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209418189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209418189">(Sep 08 2020 at 17:27)</a>:</h4>
<p>Well, if we don't have the feature gate enabled,we can certainly just iterate over <code>upvars_mentioned</code> and add a "base access" of "read" to the local variables -- but actually this only matters for <code>move</code> closures, I believe.</p>



<a name="209418264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209418264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209418264">(Sep 08 2020 at 17:28)</a>:</h4>
<p>So we could say:</p>
<ul>
<li>If the feature gate is not enabled</li>
<li>and this is a move closure</li>
<li>then it moves all the <code>upvars_mentioned</code>, skip the rest of the analysis</li>
</ul>
<p>Otherwise, we do the analysis based on the <code>ExprUseVisitor</code></p>



<a name="209418294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209418294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209418294">(Sep 08 2020 at 17:28)</a>:</h4>
<p>That may well be what we want</p>



<a name="209418352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209418352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209418352">(Sep 08 2020 at 17:29)</a>:</h4>
<p>So essentially it will end up looking like: <a href="https://github.com/rust-lang/rust/compare/62392966a3937362146d7228444c8d843d97285...sexxi-goose:use_places_aman">https://github.com/rust-lang/rust/compare/62392966a3937362146d7228444c8d843d97285...sexxi-goose:use_places_aman</a></p>



<a name="209418406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209418406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209418406">(Sep 08 2020 at 17:29)</a>:</h4>
<p>With a feature flag instead of env variable</p>



<a name="209418438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209418438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209418438">(Sep 08 2020 at 17:29)</a>:</h4>
<p>and hopefully much lower code duplication</p>



<a name="209420841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209420841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209420841">(Sep 08 2020 at 17:49)</a>:</h4>
<p>Probably :)</p>



<a name="209420888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209420888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209420888">(Sep 08 2020 at 17:49)</a>:</h4>
<p>that's a big diff but I'm guessing yes</p>



<a name="209421521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209421521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209421521">(Sep 08 2020 at 17:54)</a>:</h4>
<p>That was initial hacking we sort of did to verify things, so was a lot of copy all paste all</p>



<a name="209422541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209422541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209422541">(Sep 08 2020 at 18:02)</a>:</h4>
<p>Actually this would also remove the weird things we would have to do in infer borrow kind to pretend we are capturing the root variable</p>



<a name="209422895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209422895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209422895">(Sep 08 2020 at 18:05)</a>:</h4>
<p>So the way I picture this:</p>
<ul>
<li>if feature flag not set init the capture information for root variables </li>
<li>do the new capture analysis. Now since we have already initialized based on root variable, the minimum capture analysis (only b is captured when b.c and b are captured) will result in only capturing the root variable</li>
</ul>



<a name="209423820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209423820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209423820">(Sep 08 2020 at 18:14)</a>:</h4>
<p>Ah, interesting</p>



<a name="209423874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209423874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209423874">(Sep 08 2020 at 18:14)</a>:</h4>
<p>Yeah, ok, that makes sense. Just setting any use at all will ultimately force that root use to be the same as today I suppose</p>



<a name="209423886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209423886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209423886">(Sep 08 2020 at 18:14)</a>:</h4>
<p>Yup</p>



<a name="209424428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209424428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209424428">(Sep 08 2020 at 18:19)</a>:</h4>
<p>Do we want to allow the fn ptr coercion with this?</p>



<a name="209432651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209432651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209432651">(Sep 08 2020 at 19:27)</a>:</h4>
<p>not sure what you mean</p>



<a name="209433024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209433024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209433024">(Sep 08 2020 at 19:30)</a>:</h4>
<p><a href="/user_uploads/4715/TMSK2q3yoaZn0S5JxtIXX324/image.png">image.png</a> <br>
This bit</p>
<div class="message_inline_image"><a href="/user_uploads/4715/TMSK2q3yoaZn0S5JxtIXX324/image.png" title="image.png"><img src="/user_uploads/4715/TMSK2q3yoaZn0S5JxtIXX324/image.png"></a></div>



<a name="209433129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209433129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209433129">(Sep 08 2020 at 19:31)</a>:</h4>
<p>So allow such code because c doesn't really capture anything</p>



<a name="209433295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209433295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209433295">(Sep 08 2020 at 19:33)</a>:</h4>
<p>well</p>



<a name="209433305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209433305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209433305">(Sep 08 2020 at 19:33)</a>:</h4>
<p>Right so I think we said</p>



<a name="209433340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209433340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209433340">(Sep 08 2020 at 19:33)</a>:</h4>
<p>OK, I remember</p>



<a name="209433397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209433397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209433397">(Sep 08 2020 at 19:34)</a>:</h4>
<p>I think we should <em>start</em> with <em>coercions are decided based on whether upvars are <strong>mentioned</strong></em></p>



<a name="209433400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209433400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209433400">(Sep 08 2020 at 19:34)</a>:</h4>
<blockquote>
<p>For coercing a closure to FnPtr, instead of relying on upvars_mentioned in typechk we will accept such code in typechk while setting a no-capture obligation that will be validated in trait selection post capture analysis.</p>
</blockquote>



<a name="209433439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209433439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209433439">(Sep 08 2020 at 19:34)</a>:</h4>
<p>yes, but eventually we might adopt that sol'n</p>



<a name="209433474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209433474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209433474">(Sep 08 2020 at 19:34)</a>:</h4>
<p>I think it's not worth doing that up front</p>



<a name="209433527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209433527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209433527">(Sep 08 2020 at 19:35)</a>:</h4>
<p>Yeah, that's what I was thinking. Especially since we are kind of really tying the relaxation with 2229 feature flag</p>



<a name="209973480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209973480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209973480">(Sep 14 2020 at 07:43)</a>:</h4>
<p>I cleaned up the existing code, and it looks like: <a href="https://github.com/rust-lang/rust/compare/master...sexxi-goose:use_places_new?expand=1">https://github.com/rust-lang/rust/compare/master...sexxi-goose:use_places_new?expand=1</a>. </p>
<p>This still needs some polishing, but should give a high level idea. </p>
<p>For the most part it would look like this, major change would be around <code>set_closure_captures</code> turning into the minimal capture analysis and check for which new analysis will be based on a feature flag instead of env variable.</p>
<p>I ran the test suite with old analysis and all of them passed for stage0</p>



<a name="209973516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/209973516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#209973516">(Sep 14 2020 at 07:44)</a>:</h4>
<p>I'll do more testing stage1 and checking the new analysis results over the next week</p>



<a name="210059755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/210059755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#210059755">(Sep 14 2020 at 20:37)</a>:</h4>
<p>I'm reading this diff, <span class="user-mention" data-user-id="281950">@Aman Arora</span>, is there a particular part you wanted to draw my attention to?</p>



<a name="210060099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/breaking%20changes/near/210060099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/breaking.20changes.html#210060099">(Sep 14 2020 at 20:39)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/compare/master...sexxi-goose:use_places_new?expand=1#diff-a7b1a49c68b1a1ce388558eee4f3514aR118-R131">https://github.com/rust-lang/rust/compare/master...sexxi-goose:use_places_new?expand=1#diff-a7b1a49c68b1a1ce388558eee4f3514aR118-R131</a></p>
<p>Just to kind of give an idea of how the old analysis wil be managed along, not too much code after all :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>